using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing;

namespace TTBox
{
public class ConfirmMessage : Form
{
    // Fields
    private IContainer components;
    private string flag;
    private string Header;
    private Label lblMsg;
    private string Message;
    private PictureBox pbCancel;
    private PictureBox pbConfirm;
    private Panel pnlMsg;

    // Methods
    public ConfirmMessage(string flag, string Msg, string Hd)
    {
        this.flag = flag;
        this.Message = Msg;
        this.Header = Hd;
        this.InitializeComponent();
    }

    private void ConfirmMessage_Load(object sender, EventArgs e)
    {
        this.Text = this.Header;
        this.lblMsg.Text = this.Message;
        base.Top = 50;
        base.Left = 0x69;
        if (this.flag == "0")
        {
            this.pbCancel.Visible = false;
            this.pbConfirm.Location.Offset(0x4e, 0x59);
        }
    }

    protected override void Dispose(bool disposing)
    {
        if (disposing && (this.components != null))
        {
            this.components.Dispose();
        }
        base.Dispose(disposing);
    }

    private void InitializeComponent()
    {
        ComponentResourceManager manager = new ComponentResourceManager(typeof(ConfirmMessage));
        this.pnlMsg = new Panel();
        this.pbCancel = new PictureBox();
        this.pbConfirm = new PictureBox();
        this.lblMsg = new Label();
        this.pnlMsg.SuspendLayout();
        base.SuspendLayout();
        this.pnlMsg.BackColor = Color.LightSteelBlue;
        this.pnlMsg.Controls.Add(this.pbCancel);
        this.pnlMsg.Controls.Add(this.pbConfirm);
        this.pnlMsg.Controls.Add(this.lblMsg);
        manager.ApplyResources(this.pnlMsg, "pnlMsg");
        this.pnlMsg.Name = "pnlMsg";
        manager.ApplyResources(this.pbCancel, "pbCancel");
        this.pbCancel.Name = "pbCancel";
        this.pbCancel.Click += new EventHandler(this.pbCancel_Click);
        manager.ApplyResources(this.pbConfirm, "pbConfirm");
        this.pbConfirm.Name = "pbConfirm";
        this.pbConfirm.Click += new EventHandler(this.pbConfirm_Click);
        manager.ApplyResources(this.lblMsg, "lblMsg");
        this.lblMsg.ForeColor = Color.FromArgb(0, 0, 0xc0);
        this.lblMsg.Name = "lblMsg";
        base.AutoScaleDimensions = new SizeF(96f, 96f);
        base.AutoScaleMode = AutoScaleMode.Dpi;
        manager.ApplyResources(this, "$this");
        this.BackColor = Color.MediumBlue;
        base.ControlBox = false;
        base.Controls.Add(this.pnlMsg);
        base.MaximizeBox = false;
        base.MinimizeBox = false;
        base.Name = "ConfirmMessage";
        base.Load += new EventHandler(this.ConfirmMessage_Load);
        this.pnlMsg.ResumeLayout(false);
        base.ResumeLayout(false);
    }

    private void pbCancel_Click(object sender, EventArgs e)
    {
        base.Tag = 0;
        base.Close();
    }

    private void pbConfirm_Click(object sender, EventArgs e)
    {
        base.Tag = 1;
        base.Close();
    }
}

 
 

}
